Skip to content

OBLS-940 Refresh putaway candidates and fix putaway location entry - #443

Open
olewandowski1 wants to merge 1 commit into
developfrom
OBLS-940
Open

OBLS-940 Refresh putaway candidates and fix putaway location entry#443
olewandowski1 wants to merge 1 commit into
developfrom
OBLS-940

Conversation

@olewandowski1

@olewandowski1 olewandowski1 commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Link to Jira ticket: OBLS-940

Changes

  • Refetch on focus via useFocusEffect, matching the pattern in PutawayTaskListScreen.
  • filteredPutawayCandidates state is gone. The visible list is a useMemo over the fetched candidates and the search term, so it cannot go stale.
  • refreshing is cleared on request completion instead of on a Redux reference change.
  • Removed the unreachable "already in a pending putaway" alert. The READY filter already excludes every row that has an id.
  • Replaced the dead connect prop types with a PutawayCandidate interface, so the screen is no longer any typed throughout.
  • Uses ScannerInput for hardware scans, manual typing via the keyboard toggle, and a destination bin search. searchType is destinationBin, which excludes RECEIVE_STOCK bins and so lists only valid putaway destinations.
  • Confirm is gated on a location being present rather than failing server side with a confusing message.
  • Removed the redundant "Scan Putaway Location" label above the field, since the input carries its own label.

Putaway Candidates only fetched in componentDidMount, so returning from
a completed putaway showed a stale list, and the filtered rows were held
in state that a refresh never recomputed. Converted the screen to a
function component so it refetches on focus and derives the visible list
from the fetched data, which removes both stale paths. The unreachable
"already in a pending putaway" alert is gone, since the READY filter
already excludes every row that has an id.

Putaway Item Detail could not complete a putaway at all. The scan field
was rendered with editable false and the screen had no scan listener, so
scannedPutawayLocation stayed empty and validatePutawayItem rejected
every submission. It now uses ScannerInput for hardware scans, manual
typing and the destination bin search, and Confirm is gated on a
location being present instead of failing server side.

The root cause of the dead search and Confirm buttons was the bare
ScrollView, which defaults keyboardShouldPersistTaps to never, so the
first tap was consumed dismissing the keyboard while the input held
focus. Every sibling screen sets this prop; this one did not, and the
previous non editable field hid it.

Completing a putaway now drops the row immediately. The backend defers
the product availability refresh, so the candidates response still
reports the old quantity for a while after the transfer. An override
keyed on bin, lot and product records the expected remaining quantity
and is discarded once the server reports a quantity at or below it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant